{include file="./headStart.tpl"}
{include file="./headEnd.tpl"}
<head>
<script type="text/javascript">
function deletechecked()
{
	var answer = confirm("Delete Selected Recored ?")
	if (answer)
	{
	  document.messages.submit();
	}
	return false;
}
function userTargetFilter()
{
  var dataString = "filterUserId=" + $("#filterUserId").val() + "&monthFilter=" + $("#monthFilter").val() + 
  	               "&yearFilter=" + $("#yearFilter").val();
  $.ajax({
    type: "GET",
    url:  "userNameAj.php",
    data: dataString,
    success: function(data){ 
    $("#userType").html(data);
    }
  });
}
/////////User Name filter start        
$(document).ready(function(){ 
	$("#achievedTarget").val(0);
});
</script>
</head>
<form name="form" action="{$smarty.server.PHP_SELF}" id="form" method="post">
<table align="center" border="" cellpadding="1" cellspacing="1" >
<tr>
  <td align="center" colspan="10" class="table1" colspan="2">Target Entry</td>
</tr>
<tr>
  <td align="right" class="table2" >User Name : </td>
  <td class="table2">
    <select name="userId" id="userId">
      <option>User Name</option>
      {html_options values=$userId output=$userName}
    </select>
  </td>
  <td align="right" class="table2" >Target For : </td>
  <td NOWRAP class="table2">
    {html_select_date prefix="month" time="$month" start_year="-3" end_year="+1" month_format="%b" field_order="MY" 
     day_value_format="%02d"}
  </td>
  <td align="right" class="table2">Target For The Month : </td>
  <td class="table2"><input type="text" name="target" value="{$target}"></td>
  <td align="right" class="table2" class="table2">Achieved Till Date : </td>
  <td class="table2"><input type="text" name="achievedTarget" id="achievedTarget" value="{$achievedTarget}"></td>
  <td align="center" colspan="2" class="table2"><input type="submit" name="insertBtn" value="Submit" class="button" /></td>
</tr>
</table>
</form> 
<form name="form1">
<table border="1" cellpadding="0" cellspacing="0" align='center'>
<br>
<br>
<tr>
  <td class="table2">User :
    <select name="userId" id="filterUserId">
      <option value="0">All</option>
        {html_options values=$userIdSearch output=$userNameSearch}
    </select>
  </td>
  <td align="right" class="table2" >Target For : </td>
  <td NOWRAP class="table2">
    {html_select_date prefix="month" time="$month" start_year="-3" end_year="+1" month_format="%b" field_order="MY" 
     all_extra='onchange=""'
     day_value_format="%02d" class="dateFilter" month_extra="id='monthFilter'" year_extra="id='yearFilter'"}
     <input type="button" value="Go..." class="button" onclick="userTargetFilter()">
  </td>
</tr>
</table>
</form>
<form action="{$smarty.server.PHP_SELF}" name='party' method='POST'>
<div id="userType">
</form>
{include file="footer.tpl"}